﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace SharePointUsers
{
    [Serializable()]
    public class Report
    {
        #region Public Properties
        public Guid ID { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }
        public int VersionMajor = 0;
        public int VersionMinor = 0;
        public SerializableDictionary<string, string> Properties;
        public SerializableDictionary<SPType, Property[]> Query;
        public SerializableDictionary<string, Property[]> QueryEx;
        public SerializableDictionary<SPType, List<string>> Scope;
        public DataTable Data { get; set; }
        #endregion
        public Report()
        {
        }
        public Report(Guid id, string name, string description, int ReportVersionMajor, int ReportVersionMinor)
        {
            ID = id;
            Name = name;
            Description = description;
            VersionMajor = ReportVersionMajor;
            VersionMinor = ReportVersionMinor;
        }
        public Report(Guid id, string name, string description, SerializableDictionary<SPType, Property[]> query,
                      int ReportVersionMajor, int ReportVersionMinor)
        {
            ID = id;
            Name = name;
            Description = description;
            Query = query;
            VersionMajor = ReportVersionMajor;
            VersionMinor = ReportVersionMinor;
        }
    }
    [Serializable()]
    public struct Property
    {
        public string Name;
        public string DisplayName;
        public SerializableDictionary<string, string> Properties;
    }
}
